home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / script / mudirc < prev    next >
Encoding:
Text File  |  2002-10-28  |  1.6 KB  |  68 lines

  1. # EPIC's mud client, 1998
  2. # Based on the old 1994-vintage script by the same name
  3. # This script requires EPIC4pre1.050 or better
  4. # Here's the plan:
  5. #
  6. # Usage:  newmud keyword hostname portnum
  7. #     registers "keyword" in the mud array
  8. #
  9. # Usage:  mud
  10. #     shows you the muds in the array
  11. #
  12. # Usage:  mud keyword
  13. #     logs you into that mud
  14. #
  15. alias mud {
  16.         if ([$0])
  17.         {
  18.                 if (mud[$encode($0)][name])
  19.                 {
  20.                         if (mud[$encode($0)][mark])
  21.                         {
  22.                                 echo *** Already connected to that mud!
  23.                         }
  24.                         {c_mud $0 $mud[$encode($0)][name] $mud[$encode($0)][port]}
  25.                 }
  26.                 {echo *** No such mud on file}
  27.         }
  28.         {
  29.                 foreach mud i
  30.                 {
  31.                         echo *** MUD: $decode($i) - $mud[$i][name] $mud[$i][port]
  32.                 }
  33.         }
  34. }
  35. alias c_mud {
  36.         @ keyw = [$0]
  37.         @ mudcon = mudcon + 1
  38.         if (mudcon == 5)
  39.         {
  40.                 @ mudcon = mudcon - 1
  41.                 echo *** Too many muds open (limit of 4)
  42.         }
  43.         {
  44.                 window new name $keyw level NONE
  45.  
  46.         @ fd = mud[$encode($0)][fd] = connect($1 $2)
  47.         ^on ^dcc_raw "$fd % d *" \{xecho -w $keyw $$chop($3-)\}
  48.         ^on ^dcc_raw "$fd % c" {
  49.             on dcc_raw -"$0 % c"
  50.             on dcc_raw -"$0 % d *"
  51.             @ mudcon = mudcon - 1
  52.         }
  53.         window query =$fd
  54.         }
  55. }
  56. bind ^W next_window
  57.  
  58. alias newmud {
  59.         @ mud[$encode($0)][name] = [$1]
  60.         @ mud[$encode($0)][port] = [$2]
  61. }
  62.  
  63. newmud onyx stimpy.cs.iastate.edu 3456
  64. newmud moo lambda.moo.mud.org 8888
  65. @ mudcon = 0
  66.  
  67. #hop'98
  68.